package com.seagull.core.test.desing.xiangyuan;

/**
 * @author:jian.zhou
 * @DATE: 2017/12/27.
 * @Version:0.0.1
 * @Desc:
 */
public class Client {

    public static void main(String[] args) {

        FlyweightFactory factory = new FlyweightFactory();

        Flyweight flyweightA = factory.factory(new Character('A'));
        flyweightA.operation("First Call , A State");
        System.out.println(flyweightA);

        Flyweight flyweightB = factory.factory(new Character('B'));
        flyweightB.operation("Second Call , B State");
        System.out.println(flyweightB);

        Flyweight flyweightC = factory.factory(new Character('A'));
        flyweightC.operation("Third Call , A State");
        System.out.println(flyweightC);

    }
}
